import request from "@/utils/request";

// 获取防疫任务列表
export function getDisinfectTask(params) {
  return request({
    url: "/robot-disinfect-task/v1/list",
    method: "get",
    params: params,
  });
}

// 删除防疫任务
export function deleteDisinfectTask(id) {
  return request({
    url: "/robot-disinfect-task/v1/" + id,
    method: "delete",
  });
}

// 激活防疫任务
export function activationDisinfectTask(id) {
  return request({
    url: "/robot-disinfect-task/activation/" + id,
    method: "get",
  });
}

// 创建防疫任务
export function createDisinfectTask(data) {
  return request({
    url: "/robot-disinfect-task/v1/add",
    method: "post",
    data: data,
  });
}

// 更新防疫任务
export function updateDisinfectTask(id, data) {
  return request({
    url: "/robot-disinfect-task/v1/update",
    method: "put",
    data: data,
  });
}
